package cn.com.nes.site.entity.em.ctce;

/**
 * 安装位置
 */
public enum AzwzEnum {
    WD("01", "屋顶"), DM("02", "地面"), GQ("03", "挂墙");

    private final String code;

    private final String description;

    AzwzEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static AzwzEnum getByCode(String code) {
        for (AzwzEnum a : AzwzEnum.values()) {
            if (a.getCode().equals(code)) {
                return a;
            }
        }
        return null;
    }

    public static AzwzEnum getByDescription(String description) {
        for (AzwzEnum a : AzwzEnum.values()) {
            if (a.getDescription().equals(description)) {
                return a;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
